The file system is a method and a data structure for specifying a file on a disk or a partition in an operating system context, i.e., a method for organizing files on the disk. The file system also refers to the disk or partition for storing files, or refers to a file system type. The file system is short for the file management system, referring to a software organization responsible for the management and storage of file information in the operating system, and consisting of the three following parts: software related to the file management, managed files and data structure needed for the file management. From the standpoint of the system, the file system is a system for organizing and allocating the file storage space, and responsible for the storage of the file and the protection and retrieval of the stored files. Specifically, it is responsible for creating, saving, reading, modifying and dumping a file and controlling the file access for a user, and canceling the file which is not used by the user any more. Furthermore, storage media are maintained by the file system, so that the utilization frequency of each area of the storage media is balanced and the service life of the storage media is effectively prolonged.
Except the electronic products which only serve as a storage device, large base station equipment as well as a small computer and mobile phone all adopt different file system technologies. For example, in the VxWorks operating system which utilizes the same file system (dosFs) as the DOS, the file system is established on a block device. Under the vxWorks I/O system, the True Flash File System (TFFS) is a program module for driving the block device and provides a unified block device interface for various storage devices, and furthermore, it is characterized by reenterability and thread security, and supports most of popular Central Processing Unit (CPU) architectures. With the file system management, the application reads and writes the FLASH storage device as if it operates a disk device which has an MS-DOS file system.
Since the file system management is executed by a pure software algorithm, there is a common problem in the industry at present, that is, file system crash caused by abnormal power failure, which shows that the cluster table information of a management file is damaged to lead to the non-identification of file management information, so that no file can be found, and the file system has to be formatted to re-create the cluster table information, and accordingly, all the files are removed and the version file is also lost. Therefore, the manufactures have to repair the products.
At present, a common method is to store the version file and the important information files to a private data area of a non-file system part, however, because the method is based on a large storage device space, for many electronic products with small-capacity storage media, the method may greatly reduce the use space of the file management part of the storage space and shorten the service life of the storage media.